package com.bong.panpan.bongcharttools.custom;

import com.bong.panpan.bongcharttools.ble.BleDeviceState;
import com.bong.panpan.bongcharttools.ble.BleLink;

/**
 * Created by panpan on 2017/10/25.
 */

public abstract class BleStateRunnable2 implements Runnable {
    private BleLink bleLink;
    private BleDeviceState state;

    public BleStateRunnable2(BleLink bleLink, BleDeviceState state) {
        this.bleLink = bleLink;
        this.state = state;
    }

    @Override
    public void run() {
        if (bleLink != null)
            OnDeviceStateChanged(bleLink, state);
    }

    public abstract void OnDeviceStateChanged(BleLink bleLink, BleDeviceState state);
}
